#include<stdio.h>
void find(int a)
{
    if (a == 1)
        printf("A ");
    else if (a == 11)
        printf("Jack ");
    else if (a == 12)
        printf("Queen ");
    else if (a == 13)
        printf("King ");
    else
        printf("%d ", a);
    printf("\n");
}

int main()
{
    int Spades[14] = { 0 };
    int Hearts[14] = { 0 };
    int Clubs[14] = { 0 };
    int Diamonds[14] = { 0 };
    int* arr[4] = { Spades,Hearts,Clubs,Diamonds };
    int i = 0;
    while (i != 52)
    {
        int a = rand() % 13+1 ;
        int b = rand() % 4 ;
        if (arr[b][a] == 0)
        {
            i++;
            arr[b][a] = a;
            switch (b)
            {
            case 0:
                printf("Spades ");
                find(a);
                break;
            case 1:
                printf("Hearts ");
                find(a);
                break;
            case 2:
                printf("Clubs ");
                find(a);
                break;
            case 3:
                printf("Diamonds ");
                find(a);
                break;
            default:
                break;
            }
        }
    }
}